package com.groep21.android;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class BabyTracker extends Activity {
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.babytracker);
        
        final Button  btndiary = (Button) this.findViewById(R.id.Diary);
        final Button  btncharts = (Button) this.findViewById(R.id.Charts);
        final Button  btnphotos = (Button) this.findViewById(R.id.Photos);
        final Button  btnvaccinations = (Button) this.findViewById(R.id.Vaccinations);
        
        btndiary.setOnClickListener(new View.OnClickListener(){

        	public void onClick(View v){
        		Log.i(BabyTracker.class.getName(),"Button Clicked!");
        		try {
        			Intent i = new Intent(v.getContext(), NotesList.class);
        	        startActivity(i);
        		} catch (Exception e) {
        			Log.e(BabyTracker.class.getName(),"Error occured [" + e.getMessage() + "]");
        		}
        	}
        });
        
        btnvaccinations.setOnClickListener(new View.OnClickListener(){

        	public void onClick(View v){
        		Log.i(BabyTracker.class.getName(),"Button Clicked!");
        		try {
        			Intent i = new Intent(v.getContext(), Vaccinaties.class);
        	        startActivity(i);
        		} catch (Exception e) {
        			Log.e(BabyTracker.class.getName(),"Error occured [" + e.getMessage() + "]");
        		}
        	}
        });
        
        btnphotos.setOnClickListener(new View.OnClickListener(){

        	public void onClick(View v){
        		Log.i(BabyTracker.class.getName(),"Button Clicked!");
        		try {
        			Intent i = new Intent(v.getContext(), PhotoBooth.class);
        	        startActivity(i);
        		} catch (Exception e) {
        			Log.e(BabyTracker.class.getName(),"Error occured [" + e.getMessage() + "]");
        		}
        	}
        });
        
        btncharts.setOnClickListener(new View.OnClickListener(){

        	public void onClick(View v){
        		Log.i(BabyTracker.class.getName(),"Button Clicked!");
        		try {
        			Intent i = new Intent(v.getContext(), Grafiek.class);
        	        startActivity(i);
        		} catch (Exception e) {
        			Log.e(BabyTracker.class.getName(),"Error occured [" + e.getMessage() + "]");
        		}
        	}
        });
    }

}
